package cn.biplam.front.component.view.systemManage.sysMaintain;

import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.UserInfo;
import cn.biplam.front.component.AjxResponse;
import cn.biplam.front.component.data.common.CaptionComp;
import cn.biplam.front.component.view.systemManage.menu.MenuTreeThird;
import cn.biplam.front.component.view.systemManage.menu.MenuTreeThird.Menu_Type;
import cn.biplam.front.html.HtmlDiv;
import cn.biplam.front.html.base.HtmlWindow;
import cn.biplam.front.template.control.TreeNavigator;
import cn.biplam.front.template.pageFrame.mdManage.MdPage;
import cn.biplam.front.template.pageFrame.mdManage.MdSimpleDomain;

/**
 * 系统维护
 */
public class SysMaintain extends AjxResponse{

	public  final static String cId="8401";
	public final static String aId = "840101";
	private String pcid1="840102";
	private String pcid2="840103";
	private String pcid3="840104";
	private String pcid4="840105";
	
	
	@Override
	protected HtmlWindow ajxGet() throws ErrorMessage {
		return this.get(mUser, sHomeUrl);
	}
	
	public HtmlWindow get(UserInfo mUser,String sHomeUrl) throws ErrorMessage{
		/**导航栏宽度*/
		String width = "200";
		
		MdPage mp=new MdPage(cId,sHomeUrl,mUser);
		/** 设置界面标题(规则管理) */
		mp.setTitleDesc(CaptionComp.get(mUser, "226"));
		/** 设置界面标题logo */
		mp.setTitleLogo("/images/sm_rule.gif");
		
		MdSimpleDomain nav=new MdSimpleDomain("ruleMa");
		
		HtmlWindow treeNav = new HtmlDiv();
		TreeNavigator navigator=new TreeNavigator(this.pcid1,"系统基础维护",sHomeUrl,mUser);
		MenuTreeThird menuTree = new MenuTreeThird();
		menuTree.setFilter(Menu_Type.System,"1001","0","2");
		menuTree.setModelCallBack(Menu_Type.System,null,null);
		menuTree.setRightMenu(false);
		menuTree.setShowCheckBox(false);
		navigator.setTree(menuTree.get(mUser, sHomeUrl,this.pcid1));
		treeNav = navigator.get();
		treeNav.setStyleWidth(width);
		nav.put(treeNav);
		
		navigator=new TreeNavigator(this.pcid2,"规则引擎维护",sHomeUrl,mUser);
		menuTree = new MenuTreeThird();
		menuTree.setFilter(Menu_Type.SQL,"1002","0","2");
		menuTree.setModelCallBack(Menu_Type.SQL,null,null);
		menuTree.setRightMenu(false);
		menuTree.setShowCheckBox(false);
		navigator.setTree(menuTree.get(mUser, sHomeUrl,this.pcid2));
		treeNav = navigator.get();
		treeNav.setStyleWidth(width);
		nav.put(treeNav);
		
		navigator=new TreeNavigator(this.pcid3,"业务模型维护",sHomeUrl,mUser);
		menuTree = new MenuTreeThird();
		menuTree.setFilter(Menu_Type.BusinessModel,"1003","0","2");
		menuTree.setModelCallBack(Menu_Type.BusinessModel,null,null);
		menuTree.setRightMenu(false);
		menuTree.setShowCheckBox(false);
		navigator.setTree(menuTree.get(mUser, sHomeUrl,this.pcid3));
		treeNav = navigator.get();
		treeNav.setStyleWidth(width);
		nav.put(treeNav);
		
		navigator=new TreeNavigator(this.pcid4,"数据处理维护",sHomeUrl,mUser);
		menuTree = new MenuTreeThird();
		menuTree.setFilter(Menu_Type.DataDeal,"1004","0","2");
		menuTree.setModelCallBack(Menu_Type.DataDeal,null,null);
		menuTree.setRightMenu(false);
		menuTree.setShowCheckBox(false);
		navigator.setTree(menuTree.get(mUser, sHomeUrl,this.pcid4));
		treeNav = navigator.get();
		treeNav.setStyleWidth(width);
		nav.put(treeNav);
		
		mp.putManage(nav.get());
		HtmlWindow div = mp.get();
		return div;
	}
	
}
